Skip to content

Add Markdown support to basic Text widget (Lit).#998

Merged
ditman merged 7 commits intogoogle:mainfrom
ditman:lit-09-markdown
Mar 31, 2026
Merged

Add Markdown support to basic Text widget (Lit).#998
ditman merged 7 commits intogoogle:mainfrom
ditman:lit-09-markdown

Conversation

@ditman
Copy link
Copy Markdown
Collaborator

@ditman ditman commented Mar 26, 2026

Description

Adds Markdown support to the basic Text widget of the v0_9 Lit renderer.

(This is a very similar, but separate, implementation to what exists in v0.8 today. Adds a couple of tests to the directive.)

Also modifies the demo:gallery09 to inject a Markdown renderer for testing.


Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Lit renderer to version 0.8.5, introducing markdown support for the Text widget and a new Context.markdown API for dependency injection. It adds a MarkdownDirective that utilizes unsafeHTML and until for asynchronous rendering, along with corresponding tests and sample updates. Feedback suggests improving the logic for prepending markdown heading symbols to prevent redundant formatting when the input text already contains them.

@ditman
Copy link
Copy Markdown
Collaborator Author

ditman commented Mar 30, 2026

Should have clicked "Submit" days ago; the only change I made was to sync the changelog with the newest v0.9 version.

@ditman
Copy link
Copy Markdown
Collaborator Author

ditman commented Mar 31, 2026

OK, landing this. I co-opted Jacob's v0.9.0 since it hadn't been published before to integrate this change. Next changes to the lit renderer should probably roll the version forward as normal.

@ditman ditman merged commit 49df893 into google:main Mar 31, 2026
12 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Lit] Support Markdown in text Component

3 participants